import request from "@/api/request";
import requestPhp from "@/api/requestPhp";
import { apiJava, apiOa, apiPhp } from "@/api/root";

// 获取登录用户信息
export const getLoginInfo = (data) => {
  return requestPhp.get(`${apiPhp}index/login/login_info`, data);
};

// 获取当前用户菜单及按钮权限
export const getUserPermissions = (data) => {
  return request.get(`${apiJava}/api-user/menu/getMyMenuTree`, data);
};

// 平台基础信息
export const info = (data) => {
  return request.get(`${apiJava}/api-career/zt/info`, data || {});
};

// 各项权益点击统计
export const staticData = (data) => {
  return request.post(`${apiJava}/api-career/zt/static`, data || {});
};

// 任务访问趋势
export const trend = (data) => {
  return request.post(`${apiJava}/api-career/zt/right/trend`, data || {});
};

// 卡片类型(主要用于区分1.0版本的数据和2.0版本的数据)
export const cardTypeList = (data) => {
  return request.get(`${apiJava}/api-career/zt/cardType/list`, data || {});
};

// 客户单位列表
export const applyList = (data) => {
  return request.get(`${apiJava}/api-career/zt/app/list`, data || {});
};

// 排行榜头部最近完成的人
export const latedFinishedRecord = (data) => {
  return request.post(`${apiJava}/api-career/zt/rank/record`, data || {});
};

// 权益列表（2.0）
export const selectList = (data) => {
  return request.get(`${apiJava}/api-career/zt/right/selectList`, data || {});
};

// 排行榜
export const rank = (data) => {
  return request.post(`${apiJava}/api-career/zt/rank`, data || {});
};

// 上传图片
export const uploadImage = (data) => {
  return request.post("https://upload.yl1001.com/upload/images/save", data);
};

// 上传文件
export const uploadFile = (data) => {
  return request.post("https://upload.yl1001.com/upload/file/save", data);
};

// 获取报告列表
export const getReportList = (data) => {
  return request.post(
    `${apiJava}/api-occupation/activity/getPageActivity`,
    data
  );
};

// 获取职途报告v2.0
export const getReport = (data) => {
  return request.post(`${apiJava}/api-career/zt/get/v2/report`, data);
};

// 生成职途报告v2.0
export const createReport = (data) => {
  return request.post(`${apiJava}/api-career/zt/create/v2/report`, data);
};

// 获取顾问下拉列表
export const getConsultantList = (data) => {
  return request.post(`${apiJava}/api-career/zt/consultant/search`, data);
};

// 获取用户下拉列表
export const getPersonList = (data) => {
  return request.post(`${apiJava}/api-career/zt/person/search`, data);
};

// 获取任务状态下拉列表
export const getRightsList = (data) => {
  return request.get(`${apiJava}/api-career/zt/right/list`, data);
};

// 获取任务状态下拉列表(新)
export const getTaskList = (data) => {
  return request.get(`${apiJava}/api-career/zt/right/selectList`, data);
};

// 获取客户单位下拉列表
export const getProjectList = (data) => {
  return request.get(`${apiJava}/api-career/zt/cardType/list`, data);
};

// 综合搜索(主接口）
export const getAllUserList = (data) => {
  return request.post(`${apiJava}/api-career/zt/list`, data);
};

// 删除用户
export const deletePerson = (data) => {
  return request.post(`${apiJava}/api-career/zt/card/delete`, data);
};

// 文件职途上传
export const uploadCareerFile = (data) => {
  return request.post(`${apiJava}/api-career/zt/file/upload`, data);
};

// 获取二维码
export const qrcode = (data) => {
  return request.post(`${apiJava}/api-career/zt/qrcode`, data);
};

// 获取用户是否有上传文件权限
export const getHandleFileAuth = (data) => {
  return request.post(`${apiJava}/api-career/zt/file/auth`, data);
};

// 获取用户上传的全部文件url
export const getFileList = (data) => {
  return request.post(`${apiJava}/api-career/zt/file/list`, data);
};

// 文件职途上传更新
export const updateCareerFile = (data) => {
  return request.post(`${apiJava}/api-career/zt/file/update`, data);
};

// 删除文件
export const deleteFile = (data) => {
  return request.post(`${apiJava}/api-career/zt/file/delete`, data);
};

// 获取职业报告
export const careerReport = (data) => {
  return request.post(`${apiJava}/api-career/zt/careerReport`, data);
};

// 获取职途报告
export const getCareerPathReport = (data) => {
  return request.post(`${apiJava}/api-career/zt/report/info`, data);
};

// 上传职途报告
export const uploadCareerPathReport = (data) => {
  return request.post(`${apiJava}/api-career/zt/report/upload`, data);
};

// 查询权益详情
export const rightStatusDetail = (data) => {
  return request.post(`${apiJava}/api-career/zt/right/detail`, data);
};

// oa 人员树
export const getOrgPerson = (data) => {
  return request.post(`${apiOa}/api-oa/baseSupport/getUserTree`, data);
};

// oa部门树（java中转php版本）
export const getOrgTreeOld = (data) => {
  return request.get(`${apiOa}/api-oa/baseSupport/getDeptTree`, data);
};

// 模糊搜索用户
export const getUserList = (data) => {
  return request.post(`${apiOa}/api-oa/empInfo/userList`, data);
};

// 应用方列表
export const applicationList = (data) => {
  return request.get(`${apiJava}/api-career/zt/app/list`, data);
};

// 2.0一级权益列表
export const rightsList = (data) => {
  return request.get(`${apiJava}/api-career/app/rights`, data);
};

// 新增应用方
export const addNewApplication = (data) => {
  return request.post(`${apiJava}/api-career/app/save`, data);
};

// 编辑应用方
export const updateApplication = (data) => {
  return request.post(`${apiJava}/api-career/app/update`, data);
};

// 新增项目
export const addNewProject = (data) => {
  return request.post(`${apiJava}/api-career/app/cardTypeSave`, data);
};

// 编辑项目
export const updateProject = (data) => {
  return request.post(`${apiJava}/api-career/app/cardTypeUpdate`, data);
};

// 获取项目的树状结构
export const getRightsTree = (data) => {
  return request.get(`${apiJava}/api-career/app/card/rights`, data);
};

// 申请备案列表
export const getApplyRecord = (data) => {
  return request.post(`${apiJava}/api-career/apply/list`, data);
};

// 申请职途卡
export const applyCard = (data) => {
  return request.post(`${apiJava}/api-career/apply/add`, data);
};

// 库存数量
export const getStockNum = (data) => {
  return request.post(`${apiJava}/api-career/apply/stock/num`, data);
};

// 申请详情
export const applyDetail = (data) => {
  return request.post(`${apiJava}/api-career/apply/detail`, data);
};

// 审核人列表
export const getAuditerList = (data) => {
  return request.get(`${apiJava}/api-career/apply/auditer`, data);
};

// 卡号导出
export const exportCardNo = (data) => {
  return request.get(`${apiJava}/api-career/apply/card/export`, data);
};

// 卡号列表查看
export const getCardNoList = (data) => {
  return request.post(`${apiJava}/api-career/apply/cardList`, data);
};

// 卡号查看
export const getCardList = (data) => {
  return request.get(`${apiJava}/api-career/apply/cardList`, data);
};

// 审批
export const audit = (data) => {
  return request.post(`${apiJava}/api-career/apply/audit`, data);
};

// 查看在线二维码和codeKey
export const getQrCode = (data) => {
  return request.post(`${apiJava}/api-career/apply/qrCode`, data);
};

// 新增项目（可以同时新增客户单位）
export const addProject = (data) => {
  return request.post(`${apiJava}/api-career/apply/add`, data);
};

// 项目列表
export const cardTypes = (data) => {
  return request.post(`${apiJava}/api-career/app/cardTypes`, data);
};

// 删除二维码密码
export const removeCode = (data) => {
  return request.post(`${apiJava}/api-career/apply/removeCode`, data);
};

// 获取用户的简历附件
export const getResumeList = (data) => {
  return request.post(`${apiJava}/api-career/zt/get/attachment/resume`, data);
};

// 获取最新公告
export const getNoticeList = (data) => {
  return request.post(`${apiJava}/api-career/zt/notice`, data);
};

// 查询所有顾问申请列表
export const getApplyConsultantList = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/get/apply/consultant/list`,
    data
  );
};

// 查询后台顾问数据
export const getPcConsultantList = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/get/pc/consultant/list`,
    data
  );
};

// 修改顾问启用状态
export const switchConsultantStatus = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/switch/consultant/status`,
    data
  );
};

// 申请添加顾问
export const addApplyConsultant = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/add/apply/consultant
    `,
    data
  );
};
// 添加审核记录
export const addExamineRecord = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/add/examine/record
    `,
    data
  );
};
// 获取单个顾问信息
export const getApplyConsultantOne = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/get/apply/consultant/one
    `,
    data
  );
};

// 修改顾问信息
export const updateApplyConsultant = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/update/apply/consultant
    `,
    data
  );
};

// 获取顾问聊天用户列表
export const getConsultantChatPersonList = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/get/consultant/chat/person/list`,
    data
  );
};

// 获取顾问用户聊天发卡记录
export const getRecordList = (data) => {
  return request.post(
    `${apiJava}/api-career/chat/record/get/record/list`,
    data
  );
};

// 获取用户单个权益
export const getRight = (data) => {
  return request.post(`${apiJava}/api-career/zt/get/person/right`, data);
};

// 删除申请记录
export const removeApplyRecord = (data) => {
  return request.post(`${apiJava}/api-career/apply/remove`, data);
};

// 删除项目
export const removeProject = (data) => {
  return request.post(`${apiJava}/api-career/app/card/remove`, data);
};

// 顾问绩效统计计数看板
export const board = (data) => {
  return request.post(`${apiJava}/api-career/performance/static/board`, data);
};

// 顾问排行榜
export const consultantRank = (data) => {
  return request.post(`${apiJava}/api-career/performance/rank`, data);
};

// 回复及时率坐标分布图
export const score = (data) => {
  return request.post(
    `${apiJava}/api-career/performance/score/coordinate`,
    data
  );
};

// 回复及时率坐标分布图
export const reply = (data) => {
  return request.post(
    `${apiJava}/api-career/performance/reply/coordinate`,
    data
  );
};

// 顾问绩效列表
export const consultantPerformanceList = (data) => {
  return request.post(`${apiJava}/api-career/performance/month/list`, data);
};

// 顾问绩效列表导出
export const performanceDataExport = (data) => {
  return request.post(
    `${apiJava}/api-career/performance/month/list/export`,
    data
  );
};

// 顾问绩效列表导出
export const scoreDetail = (data) => {
  return request.post(`${apiJava}/api-career/performance/rate/detail`, data);
};

// 以下三个接口用于测试
// 刷新顾问当天绩效分
export const refresh = (data) => {
  return request.get(
    `${apiJava}/api-career/positionSalary/score/refresh`,
    data
  );
};

// 统计每日聊天回复时间
export const syncReply = (data) => {
  return request.post(`${apiJava}/api-career/performance/jg/sync`, data);
};

// 计算月绩效分
export const syncPerformance = (data) => {
  return request.post(`${apiJava}/api-career/performance/sync`, data);
};

// 添加简历附件(顾问给用户上传)
export const addAttachment = (data) => {
  return request.post(
    `${apiJava}/api-career/personResumeAttachment/person/add/attachment`,
    data
  );
};

// 获取顾问关联预约用户列表
export const appointmentList = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/get/consultant/person/appointment/list`,
    data
  );
};

// 获取顾问日程预约列表(按日统计)
export const dayList = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/get/consultant/appointment/day/list`,
    data
  );
};

// 顾问获取用户预约列表(后台查看)
export const appointmentListTask = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/get/pc/person/appointment/list`,
    data
  );
};

// 顾问历史统计
export const performanceHistoryData = (data) => {
  return request.post(
    `${apiJava}/api-career/performance/consultant/history`,
    data
  );
};

// 非付费用户评价
export const performanceRates = (data) => {
  return request.post(`${apiJava}/api-career/performance/rates`, data);
};

// 付费用户评价
export const payingPerformanceRates = (data) => {
  return request.post(`${apiJava}/api-career/zt/order/rates`, data);
};

// 用户案例数
export const performanceCases = (data) => {
  return request.post(`${apiJava}/api-career/performance/cases`, data);
};

// 顾问负责的项目列表
export const performanceTypes = (data) => {
  return request.post(`${apiJava}/api-career/performance/types`, data);
};

// 顾问解析报告数
export const performanceReports = (data) => {
  return request.post(`${apiJava}/api-career/performance/reports`, data);
};

// 服务用户数（其实是绑定用户数）
export const performanceServers = (data) => {
  return request.post(`${apiJava}/api-career/performance/servers`, data);
};
// 服务用户数
export const performanceServersUserNum = (data) => {
  return request.post(`${apiJava}/api-career/performance/person/list`, data);
};

// 回复及时率
export const performanceReplys = (data) => {
  return request.post(`${apiJava}/api-career/performance/replys`, data);
};

// 发布公告
export const publishNotice = (data) => {
  return request.post(`${apiJava}/api-career/zt/notice/add`, data);
};
// 订单列表
export const getOrderList = (data) => {
  return request.post(`${apiJava}/api-career/zt/order/list`, data);
};
// 获取所有订单商品名称
export const getProductList = (data) => {
  return request.post(`${apiJava}/api-career/zt/order/all/product`, data);
};
// 通过特定参数查询销售列表
export const getYlEsPersonList = (data) => {
  return request.post(
    `${apiJava}/api-occupation/ylEsPersonController/getYlEsPersonList`,
    data
  );
};
// 获取personId
export const getPersonId = (data) => {
  return request.get(`${apiJava}/api-career/zt/personId`, data);
};
// 获取海报
export const getPoster = (data) => {
  return request.post(`${apiJava}/api-career/zt/poster`, data);
};
// 推广数据总览上方三级联动下拉
export const getEventPageTree = (data) => {
  return request.post(
    `${apiJava}/api-career/event/page/get/event/page/tree`,
    data
  );
};
// 查询统计数据列表
export const getEventPageIntervalList = (data) => {
  return request.post(
    `${apiJava}/api-career/event/stat/get/event/stat/interval/list
    `,
    data
  );
};
// 查询统计趋势数据列表
export const getEventPageTrendList = (data) => {
  return request.post(
    `${apiJava}/api-career/event/stat/get/event/stat/trend/list
    `,
    data
  );
};
// 查询统计对比数据列表
export const getEventStatCompareList = (data) => {
  return request.post(
    `${apiJava}/api-career/event/stat/get/event/stat/compare/list
    `,
    data
  );
};
// 评价列表
export const getRates = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/rates
    `,
    data
  );
};
// 项目顾问列表
export const consultantList = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/get/consultant/list
    `,
    data
  );
};
// 获取增值商品
export const products = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/order/vas/products
    `,
    data
  );
};
// 获取顾问列表
export const getConsultantNameList = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/get/consultant/name/list
    `,
    data
  );
};
// 获取顾问列表
export const getCardTypeConsultantList = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/get/card/type/consultant/list
    `,
    data
  );
};
// 换绑顾问
export const changeBindConsultant = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/update/bind/consultant
    `,
    data
  );
};
// 获取用户信息
export const getUserInfo = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/person/info
    `,
    data
  );
};
// 新增/关联的职业列表
export const getAssociatedPositionList = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/position/rels
    `,
    data
  );
};
// 新增/删除关联的职业
export const editAssociatedPosition = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/position/rels/edit
    `,
    data
  );
};
// 订阅推送记录
export const subscribeManageSearch = (data) => {
  return request.post(
    `${apiJava}/api-career/subscribeManage/search
    `,
    data
  );
};
// 搜索职业接口
export const matchPositionList = (data) => {
  return request.post(
    `${apiJava}/api-career/data/center/matchPositionList
    `,
    data
  );
};
// 职业机会(即是订阅)
export const articleSearch = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/article/search
    `,
    data
  );
};
// 编辑是否关联职业机会
export const connectCareer = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/position/career
    `,
    data
  );
};
// 职位搜索
export const positionsSearch = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/positions/search
    `,
    data
  );
};
// 顾问推送岗位
export const careerPush = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/career/push
    `,
    data
  );
};
// 删除订阅推送
export const subscribeDelete = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/subscribe/delete
    `,
    data
  );
};
// 再次申请成为顾问
export const applyConsultantAgain = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/again/add/apply/consultant`,
    data
  );
};

// 顾问搜索（新）(用于下拉)
export const consultantSearch = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/search
    `,
    data
  );
};
// 手机号搜索(用于下拉)
export const telephoneSearch = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/telephone/search
    `,
    data
  );
};
// 咨询记录
export const serviceList = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/service/list
    `,
    data
  );
};
// 新增咨询记录
export const serviceSave = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/service/save
    `,
    data
  );
};
// 修改咨询记录
export const serviceUpdate = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/service/update
    `,
    data
  );
};
// 删除咨询记录
export const serviceDelete = (data) => {
  return request.post(
    `${apiJava}/api-career/consultant/service/delete
    `,
    data
  );
};
// 获取兑换码列表
export const getRedeemList = (data) => {
  return request.post(
    `${apiJava}/api-career/redeem/code/get/redeem/list
    `,
    data
  );
};
// 运营修改兑换信息/添加一条数据到key.vue
export const updateBackRedeem = (data) => {
  return request.post(
    `${apiJava}/api-career/redeem/code/update/back/redeem
    `,
    data
  );
};

// 保存邮寄信息
export const saveMailInfo = (data) => {
  return request.post(
    `${apiJava}/api-career/redeem/code/save/mail/info
    `,
    data
  );
};
// 事件分析总览
export const actCountList = (data) => {
  return request.post(
    `${apiJava}/api-career/event/stat/act/count/list
    `,
    data
  );
};
// 查询所有事件类型
export const getEventType = (data) => {
  return request.post(
    `${apiJava}/api-career/event/page/get/event/type
    `,
    data
  );
};
// 查询所有事件类型
export const actDetailList = (data) => {
  return request.post(
    `${apiJava}/api-career/event/stat/act/detail/list
    `,
    data
  );
};
// 查看编辑按钮字段和数据
export const offlineView = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/offline/view
    `,
    data
  );
};
// 批量导入线下数据
export const offlineBatchImport = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/offline/batch/import
    `,
    data
  );
};
// 批量导出线下数据
export const offlineBatchExport = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/offline/batch/export
    `,
    data
  );
};
// 获取批量导入导出结果
export const offlineGetResult = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/offline/get/result
    `,
    data
  );
};
// 编辑/新增线下数据
export const offlineEdit = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/offline/edit
    `,
    data
  );
};
// 获取项目线下导入数据配置
export const offlineConf = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/offline/conf
    `,
    data
  );
};
// 获取项目线下导入数据配置
export const offlineDownload = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/offline/download
    `,
    data
  );
};
// 订单评分详情
export const getOrderDetail = (data) => {
  return request.post(
    `${apiJava}/api-career/zt/order/detail
    `,
    data
  );
};
// 获取学生信息
export const getStudentInfo = (data) => {
  return request.post(
    `${apiJava}/api-career/user/get/info
    `,
    data
  );
};
